#include<stdlib.h>
#include<stdio.h>
#include<stdbool.h>

typedef struct node{
    char first;
    char last;
    struct node* nextLeft;
    struct node* nextRight;
    struct node* addLeft;
    struct node* addRight;
    bool isWord;
} node;

const char *wordList[] = {"apple","peach","cheese"};
const int nWords = 3;

int wordP;

const char * getNextWord(){
    if(wordP+1 >= nWords){
        return NULL;
    }
    const char * out = wordList[wordP];
    wordP++;
    return out;
}

void initNode(node * n){
    n->first = 0;
    n->last = 0;
    n->nextLeft = NULL;
    n->nextRight = NULL;
    n->addLeft = NULL;
    n->addRight = NULL;
    n->isWord = false;
}
void addWord(node * n, const char * w){
	return;
}
	
node * getTree(){
    const char * word;
    wordP = 0;
    node * top = malloc(sizeof(node));
    initNode(top);
    while((word = getNextWord()) != NULL){
        addWord(top,word);
	}
    return top;
}

void printTree(node* top){
	return;
}

int main(){
    printf("starting wordtree, do not expect much!\n");
    node * top = getTree();
    printTree(top);
    return 0;
}

